import numpy as np


m = 22
n = 14
route_table = np.zeros((m, n))   # 22 x 14
# start = np.zeros((m, 1))   # 22 x 1
# end = np.ones((m, 1))      # 22 x 1
# a = route_table[0][0:9]      # 取各行的第一个数据组成一个列表
# route_table[:, [0]] = start
# route_table[:, [0]] = end
# citys_index = list(range(0, n))
# for i in range(0, m):  # 逐个城市路径选择
#     for j in range(3, n+2):
#         tabu = route_table[i][range(0, (j - 1))]  # 蚂蚁i已经访问过的城市——禁忌表    22 行
#         allow_index = np.in1d(citys_index, tabu)
#         allow = np.array(citys_index)[allow_index]
#         print(allow)
citys_index = list(range(1, 15))
route_table[2][3] = 8
route_table[2][4] = 9
tabu = route_table[2][0:7]
allow_index = np.array(~np.in1d(citys_index, tabu))
b = allow_index.astype(int)
allow = []
for t in range(0, len(b)):
    if b[t] == 1:
        allow_citys = allow.append(citys_index[t])
    else:
        pass
# alloe_index_int = allow_index.astype(int)
# allow = citys_index(allow_index)
print(b)
print(allow)
# print(end)


